package cn.ligoo.dtu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.dtu.dao.BmuSlaveBatteryStateDao;
import cn.ligoo.dtu.domain.BmuSlaveBatteryState;
import cn.ligoo.dtu.service.BmuSlaveBatteryStateService;

/**
 * @author Jin,QingHua
 * @version 2012-07-24 12:18:52
 */
@Service
public class BmuSlaveBatteryStateServiceImpl implements BmuSlaveBatteryStateService {

	@Resource
	private BmuSlaveBatteryStateDao bmuSlaveBatteryStateDao;

	@Override
	public Integer createBmuSlaveBatteryState(BmuSlaveBatteryState t) {
		this.bmuSlaveBatteryStateDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyBmuSlaveBatteryState(BmuSlaveBatteryState t) {
		return this.bmuSlaveBatteryStateDao.updateEntity(t);
	}

	@Override
	public int removeBmuSlaveBatteryState(BmuSlaveBatteryState t) {
		return this.bmuSlaveBatteryStateDao.deleteEntity(t);
	}

	@Override
	public BmuSlaveBatteryState getBmuSlaveBatteryState(BmuSlaveBatteryState t) {
		return this.bmuSlaveBatteryStateDao.selectEntity(t);
	}

	@Override
	public Integer getBmuSlaveBatteryStateCount(BmuSlaveBatteryState t) {
		return this.bmuSlaveBatteryStateDao.selectEntityCount(t);
	}

	@Override
	public List<BmuSlaveBatteryState> getBmuSlaveBatteryStateList(BmuSlaveBatteryState t) {
		return this.bmuSlaveBatteryStateDao.selectEntityList(t);
	}

}
